package com.plant.scanner.entity;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

import java.io.Serializable;

/**
 * 用户信息实体
 */
@DatabaseTable(tableName = "user")
public class UserEntity implements Serializable {

    @DatabaseField(generatedId = true)
    private long id;

    @DatabaseField(columnName = "mobile")
    private String mobile;

    @DatabaseField(columnName = "password")
    private String password;

    @DatabaseField(columnName = "nickName")
    private String nickName;

    public UserEntity() {
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getMobile() {
        if (mobile == null) {
            mobile = "";
        }
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickName() {
        if (nickName == null) {
            nickName = "";
        }
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }
}
